import request from '@/utils/request'

// 查询年度预算列表
export function listYearsBudget(query) {
  return request({
    url: '/mis/yearsBudget/list',
    method: 'get',
    params: query
  })
}
// 查询年目标详情
export function getAnnualTargetCondition(query) {
  return request({
    url: '/mis/yearsBudget/getAnnualTargetCondition',
    method: 'get',
    params: query
  })
}

// 查询营销阶段数据
export function getMarketingStage(query) {
  return request({
    url: '/mis/yearsBudget/getMarketingStage',
    method: 'get',
    params: query
  })
}

// 查询年度预算详细
export function getYearsBudget(id) {
  return request({
    url: '/mis/yearsBudget/' + id,
    method: 'get'
  })
}

// 新增或修改年度预算
export function insertOrUpdate(data) {
  return request({
    url: '/mis/yearsBudget/insertOrUpdate',
    method: 'post',
    data: data
  })
}
// 新增年度预算
export function addYearsBudget(data) {
  return request({
    url: '/mis/yearsBudget',
    method: 'post',
    data: data
  })
}

// 修改年度预算
export function updateYearsBudget(data) {
  return request({
    url: '/mis/yearsBudget',
    method: 'put',
    data: data
  })
}

// 删除年度预算
export function delYearsBudget(id) {
  return request({
    url: '/mis/yearsBudget/' + id,
    method: 'delete'
  })
}
